<include file="Public/siteTopbar" />
<script src="__PUBLIC__/js/jquery-1.8.2.min.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/pc_common.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<include file="Public/header" />

<div class="container usercenter" style="padding-bottom:10px;">
    <div class="page-title">
        <h1>Order submitted successfully, please pay as soon as possible!</h1>
    </div>
  <p>Order #:&nbsp;&nbsp;{$order['order_sn']}<br  />
               	Order Total:&nbsp;&nbsp;<b>{$order[currency]|get_money_str}{$order['order_amount']}</b></p>
                
                 <p>Click <a id="href" href="{:U('Home/User/order_detail',array('id'=>$order['order_id']))}" style=" color:#CC0066;">here</a> to View order details.</p>
</div>



        <!--<form action="{:U('Home/Payment/getCode')}" method="post" name="cart4_form" id="cart4_form">-->
        <form action="{:U('Home/Cart/getCode')}" method="post" name="cart4_form" id="cart4_form">
            <div class="container usercenter">
                <div class="page-title">
                    <h1>Payment method</h1>
                </div>
            <div>
             <foreach name="paymentList" item="v"  key="k">
                 <p><input type="radio" id="input-ALIPAY-1" value="pay_code={$v['code']}" class="radio vam" name="pay_radio" > Paypal and Credit card</p>
                
             </foreach>



            <foreach name="bankCodeList" item="v"  key="k">
						
                                   <!--  {$paymentList[$k]['name']} -->
                            
				                      <foreach name="v" item="v2"  key="k2">
                                     
                                              <!--     <input type="radio" name="pay_radio" class="radio vam" value="pay_code={$k}&bank_code={$v2}" id="input-ALIPAY-1"> -->
				                    </foreach>                                                           
                                   
                    </foreach>        </div>
                <div class="clear" style="margin-bottom:20px;"></div>
               <!--<a class="button-style-5 button-confirm-payment" href="javascript:void(0);" onClick="$('#cart4_form').submit();" style="color:#fff; text-align:center; background:#CC0066; padding:10px 20px; border-radius:5px; overflow:hidden; " >CONTINUE TO PAYMENT</a>-->
               <a class="button-style-5 button-confirm-payment" href="javascript:;" id="pay_link"  target="_blank" style="color:#fff; text-align:center; background:#CC0066; padding:10px 20px; border-radius:5px; overflow:hidden; " >CONTINUE TO PAYMENT</a>
                <!--&lt;!&ndash; PayPal Logo &ndash;&gt;-->
                <!--<table border="0" cellpadding="10" cellspacing="0" align="center">-->
                    <!--<tr>-->
                        <!--<td align="center"></td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td align="center"><a href="https://www.paypal.com/c2/webapps/mpp/paypal-popup?locale.x=zh_C2" title="How PayPal Works" onclick="javascript:window.open('https://www.paypal.com/c2/webapps/mpp/paypal-popup?locale.x=zh_C2','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); return false;">-->
                            <!--<img src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_100x26.png" alt="立即使用PayPal购买" /></a>-->
                        <!--</td>-->
                    <!--</tr>-->
                <!--</table>-->
                <!--&lt;!&ndash; PayPal Logo &ndash;&gt;-->

                <input type="hidden" name="order_id" value="{$order['order_id']}" />
            </div>
        </form>




<include file="Public/footer" />
</body>
</html>


<link rel="stylesheet" href="__STATIC__/css/cart.css" type="text/css">
   
<script>
$(document).ready(function(){
	 $("input[name='pay_radio']").first().trigger('click');

    $.ajax({
        type : "POST",
        url:"{:U('Home/Cart/getCode')}",//+tab,
        data : $('#cart4_form').serialize(),// 你的formid
        dataType:"json",
        success: function(data){
            alert(data);
            $('#pay_link').attr('href',data);

        }
    });

















});

function change_pay(obj)
{
	$(obj).parent().siblings('input[name="pay_radio"]').trigger('click');
}
</script>    

